<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Hope2</title>

    <link rel="stylesheet" href="https://lib.baomitu.com/bulma/0.9.1/css/bulma.css">
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://www.datatables.net/rss.xml">
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.22/css/jquery.dataTables.min.css">
    <script type="text/javascript" language="javascript"
            src="https://lib.baomitu.com/jquery/3.5.1/jquery.min.js"></script>
    <script type="text/javascript" language="javascript"
            src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var link = "/etf";
            $.getJSON(link, function (data) {
                $("#description").html(data.description);
                $("#genTime").html(data.generateTime);
                $('#stockTable').DataTable({
                    data: data.resultList,
                    order: [[3, "asc"]],
                    columns: [
                        {
                            data: 'code',
                            render: function (data, type, row, meta) {
                                return type === 'display' ?
                                    `<a href="${row.url}" target="_blank">${data}</a>` :
                                    // '<a href="' + row.url + '">'+data+'</a>' :
                                    data;
                            }
                        },
                        {data: 'name'},
                        {data: 'thisWeekRangeLabel'},
                        {data: 'thisRank'},
                        {data: 'thisHold'},
                        {data: 'previousWeekRangeLabel'},
                        {data: 'previousRank'},
                        {data: 'previousHold'}
                    ]
                });
            });
        });
    </script>
</head>
<body class="layout-default">
<nav id="navbar" class="bd-navbar navbar has-shadow is-spaced">
    <div class="container">
        <div class="navbar-brand">
            <a class="navbar-item" href="https://qianyitian.com/">
                <img style="height:36px;width:36px;" src="https://img.qianyitian.com/icon/logo.png" >  <h4 class="title is-3">Hope2</h4>
            </a>
        </div>
    </div>
</nav>

<section class="hero is-light is-info">
    <div class="hero-body">
        <div class="container">
            <h1 class="title">
                各行业ETF基金
            </h1>
            <h2 class="subtitle" id="description">
                每个交易周末，在N个ETF中，选出本周涨幅前6的ETF，等权重买入或者持有。
            </h2>
            <p> 生成时间：<label id="genTime"></label></p>
            <p><a id="index-avg-monthly" href="/index-avg-monthly.html" target="_blank">各行业月涨幅统计</a>
            <p><a id="jsonReport" href="/etf-compare.html" target="_blank">可视化图表版</a>
            </p>
        </div>
    </div>
</section>


<section class="section">
    <div class="container">
        <table id="stockTable" class="display compact" style="width:100%">
            <thead>
            <tr>
                <th>代码</th>
                <th>名称</th>
                <th>本周涨幅</th>
                <th>本周排名</th>
                <th>本周持有</th>
                <th>上周涨幅</th>
                <th>上周排名</th>
                <th>上周持有</th>
            </tr>
            </thead>

            <tfoot>
            <tr>
                <th>代码</th>
                <th>名称</th>
                <th>本周涨幅</th>
                <th>本周排名</th>
                <th>本周持有</th>
                <th>上周涨幅</th>
                <th>上周排名</th>
                <th>上周持有</th>
            </tr>
            </tfoot>
        </table>
    </div>
</section>
<hr>
</body>
</html>